/**
 * @ClassName LC168
 * @Author ykx
 * @Date 2024/3/29 19:09
 * @Version 1.0
 */
public class LC168 {
    public static void main(String[] args) {
        LC168 lc168 = new LC168();
        System.out.println(lc168.convertToTitle(80));
    }

    public String convertToTitle(int columnNumber) {
        StringBuilder res = new StringBuilder();
        while (columnNumber > 0) {
            int i = (columnNumber - 1) % 26;
            res.insert(0, (char) (i + 'A'));
            columnNumber = (columnNumber - 1) / 26;
        }
        return res.toString();

    }
}
